        
        
        var animate = null;
        var animations = [];
        
        $(document).ready(function(){
            function addDelay(ind){
                var delay = 80;
                for(var dd = 1;dd < $('.splitWd').eq(ind).find('span').length;dd++){
                    setTimeout(function(){
                        $('.splitWd:eq(' + ind + ') span:not(.active)').eq(1).addClass('active');
                    },dd * delay + 120)
                }
            }
            
            setTimeout(function(){
                for(var sd = 0;sd < $('.splitWd').length;sd++){
                    addDelay(sd);
                }
    
                for(var l = 0;l < $('.ready').length;l++){
                    $('.ready')[l].anmtInd = l;
                    animations.push($('.ready')[l]);
                }
            },500)
            
            animate = setInterval(function(){
				if(!animations.length) return false;
                if(beginningDelay != null && beginningDelay < animateDelayCount){
                    beginningDelay += 10;
                    return false;
                }
                for(var r = 0;r < animations.length;r++){
                    var className = animations[r].className;
                    var ele_h = animations[r].offsetHeight;
                    var ele_top = animations[r].getBoundingClientRect().top;
                    var window_h = window.innerHeight;
                    if(className.indexOf('overHalf') >= 0){
                        ele_top += ele_h / 2;
                    }
                    //console.log(animations);
                    if(
                        (className.indexOf('overself') < 0 && ((ele_top >= 0 && ele_top < window_h) || (ele_top < 0 && ele_top > -ele_h)))
                            ||
                            (className.indexOf('overself') >= 0 && ele_top <= window_h - ele_h)
                        ){
                            var ind = animations[r].anmtInd;
                            $('.ready:eq(' + ind +')').addClass('frozen');
                            if($('.ready:eq(' + ind +')').find('.process').length){
                                console.log($('.ready:eq(' + ind +')').find('.process').attr('data-width'));
                                $('.ready:eq(' + ind +')').find('.process')[0].style.width = $('.ready:eq(' + ind +')').find('.process').attr('data-width');
                            }
                            animations.splice(r,1);
                            if(!animations.length){
                                clearInterval(animate);
                            }
                    }
                }
            },10);
            
        }) 